﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Oop3
{
    internal class Member   //类名 Pascal
    {
        //变量-字段
        private int a;  //字段：camel
        public int b;  //字段：camel

        //常量
        public const double PI = 3.14;
        //只读变量
        public static readonly Color red = Color.FromArgb(255, 0, 0);

        //函数
        public void Show()
        {

            Console.WriteLine(PI);
        }

        public int A
        {
            get { return a; }
            set
            {
                if (value < 0)
                    a = -value;
                else
                    a = value;
            }
        }

        public int C
        {
            get
            {
                return a + b;
            }
        }
    }
}
